Rsys bootstrap

javascript test sheet

Transitions

Datei: bootstrap-transition.js

required by others

Modals

Datei: bootstrap-modal.js

.modal .fade
Button: data-toggle="modal"
href="#myModal" | data-target="#myModal"
Launch modal by href empty
onclick="$('#myModal').modal({show: true, remote: '/html/bootstrap-static/rsys.html', backdrop: false})"
 href="rsys.html" data-toggle="modal" data-target="#myModal"
Methods
$('#myModal').modal({
	backdrop: true,
	keyboard: false,
	show: true,
	remote: 'rsys.html'
})
$('#myModal').modal('toggle')
$('#myModal').modal('show')
$('#myModal').modal('hide')

$('#myModal').on('hidden', function () {
	// show, shown, hide, hidden
    console.log('hidden');
})

Scrollspy

Datei: bootstrap-scrollspy.js

Scrollspy
Scrolling Content: data-spy="scroll" data-target="#navbarExample"

@fat

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

@mdo

Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.

one

Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.

two

In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.

three

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.

Scrollspy for Navigation
<body data-target=".bs-docs-sidebar" data-spy="scroll">

<ul class="nav nav-list bs-docs-sidenav" data-spy="affix" data-offset-top="275">
data-offset-top: problem with top menu changing height, cannot refresh
data-offset-top as function
no data-spy="affix" data-offset-top="275"
<body data-target=".bs-docs-sidebar" data-spy="scroll">

<ul class="nav nav-list bs-docs-sidenav"> 

					
$(function () {
  $('.bs-docs-sidenav').addClass("affix").each(function (){
    var $self = $(this);
    var offsetFn = function () {
      var h_navbar = $('.navbar-fixed-top').outerHeight();
      var h_subhead = $('.subhead').outerHeight();
      var h = h_navbar + h_subhead;
      
      if ($(".btn-navbar").is(":visible") ) { 
        h = h_navbar + h_subhead;
      } else { 
        h = h_subhead;
      }
      return h;
    }
    $self.affix({offset: {top: offsetFn}});
  });
});

Tabs

Datei: bootstrap-tabs.js

tabs

Tooltips

Datei: bootstrap-tooltip.js

rel="tooltip"
$("[rel='tooltip']").tooltip();
-- alternativ -- $('.bs-docs-tooltip-examples').tooltip({ selector : "a[data-toggle=tooltip]" })

Popovers

Datei: bootstrap-popover.js

popovers
					
// popover demo
$("a[data-toggle=popover]").popover().click(function(e) {
	e.preventDefault()
})

Alerts

Datei: bootstrap-alert.js

.alert .fade
Button: data-dismiss="alert"
Holy guacamole! Best check yo self, you're not looking too good.
.alert .fade .alert-block .alert-error
Extra Button: onclick="$(this).parent().alert('close'); return false;"

Oh snap! You got an error!

Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

Take this action Or do this

// closed, close
$('#my-alert').bind('closed', function () { // do something… })

Buttons

Datei: bootstrap-button.js

data-loading-text="Loading..."


 // button state demo
$('#fat-btn')
  .click(function () {
    var btn = $(this)
    btn.button('loading')
    setTimeout(function () {
      btn.button('reset')
    }, 3000)
  })
data-toggle="button"
data-toggle="buttons-checkbox"
data-toggle="buttons-radio""

Collapse

Datei: bootstrap-collapse.js

data-toggle="collapse"
Group: data-parent="#accordion2"
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
Here is the text
$('#collapseThree').on('hidden', function () {
    // do something…
})

Typeahead

Datei: bootstrap-typeahead.js

data-source="["a","b","c"]"
data-items="400"
data-provide="typeahead"
data-minLength="2"
Ajax
 $("[data-provide='typeahead-ajax']").typeahead({
  source: function (query, process) {
    return $.get('/json.php?typeahead', { query: query }, function (data) {
      return process(JSON.parse(data).options);
    });
  }
});

// php
if (isset($_GET['typeahead'])){
    die(json_encode(array('options' => array('Rootsystem','ist','so','cool'))));
}
All options see http://twitter.github.io/bootstrap/javascript.html#typeahead

Affix

Datei: bootstrap-affix.js

data-spy="affix" data-offset-top="200"